﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace loginSQL.Window
{

    public partial class marginWindowEdit : Form
    {
        public bool isCanceled = false;
        public float marginleft = 0f;
        public float margintop = 0f;       

        public marginWindowEdit(float marginleft, float margintop)
        {
            InitializeComponent();
            this.txt_marginleft.Text = Convert.ToString(marginleft);
            this.txt_margintop.Text = Convert.ToString(margintop);
        }

        private void btn_apply_Click(object sender, EventArgs e)
        {
            try
            {
                this.marginleft = (float)Double.Parse(txt_marginleft.Text);
                this.margintop = (float)Double.Parse(txt_margintop.Text);
                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Number Format Error");
            }

        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            isCanceled = true;
            Close();
        }
    }
}
